// USE THIS FOR SELECTING A TEMPLATE FILE
//            FileDialog dialog = new SaveFileDialog();
//            dialog.Filter = "HTML(*.html)|*.html|All files|*.*";
//            if (dialog.ShowDialog() == DialogResult.OK)
//            {
//                try
//                {


using ZoneFiveSoftware.Common.Data.Fitness;
using ZoneFiveSoftware.Common.Data.GPS;
using ZoneFiveSoftware.Common.Visuals;
using ZoneFiveSoftware.Common.Visuals.Fitness;

using System;
using System.ComponentModel;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;

namespace FTPPlugin.Settings
{
    class SettingsPage : ISettingsPage
    {
        #region ISettingsPage Members

        public Guid Id
        {
            get { return new Guid("{bab61099-341a-4cde-8a04-449f095e5a42}"); }
        }

        public IList<ISettingsPage> SubPages
        {
            get { return null; }
        }

        #endregion

        #region IDialogPage Members

        public Control CreatePageControl()
        {
            if (control == null)
            {
                control = new SettingsPageControl();
            }
            return control;
        }

        public bool HidePage()
        {
            return true;
        }

        public string PageName
        {   // Name shown in Settings Panel
            get { return Title; }
        }

        public void ShowPage(string bookmark)
        {
        }

        public IPageStatus Status
        {
            get { return null; }            
        }

        public void ThemeChanged(ITheme visualTheme)
        {
            if (control != null)
            {
                control.ThemeChanged(visualTheme);
            }
        }

        public string Title
        {
            get { return Resources.Resources.FTP_PluginTitle; }
        }

        public void UICultureChanged(System.Globalization.CultureInfo culture)
        {
            if (control != null)
            {
                control.UICultureChanged(culture);
            }
        }

        #endregion

        #region INotifyPropertyChanged Members
        public event PropertyChangedEventHandler PropertyChanged;
        #endregion

        #region Private members
//        private IActivity activity = null;
        private SettingsPageControl control = null;
        #endregion

        private void OnPropertyChanged(string propertyName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

    }
}
